<template>
  <div class="hm-son">
    我是子组件
    <button @click="btnClick">获取父组件实例</button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      num: 999
    }
  },
  methods: {
    btnClick() {
      console.log(this.$parent)
    }
  }
}
</script>
<style lang="scss" scoped>
.hm-son {
  width: 300px;
  height: 300px;
  border: 5px solid red;
}
</style>
